/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eproject_sem2;

import javax.swing.JInternalFrame;

/**
 *
 * @author ZER0
 */
public class ShowCustomer extends javax.swing.JFrame {
    Sever a=new Sever();

    public JInternalFrame getItnfShowCustomer() {
        return itnfShowCustomer;
    }
    
    /**
     * Creates new form ShowCustomer
     */
    public ShowCustomer() {
        initComponents();
        a.ShowTable("CustomersID", "Customer Name", "Customer Address", "Phonenumber", "Customer", tbCustomer);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        itnfShowCustomer = new javax.swing.JInternalFrame();
        jpIPCustomer = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbCustomer = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        itnfShowCustomer.setClosable(true);
        itnfShowCustomer.setVisible(true);

        jpIPCustomer.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1), "Customer information", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N

        tbCustomer.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "CustomersID", "CustomerName", "CustomerAddress", "Phonenumber"
            }
        ));
        tbCustomer.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tbCustomerMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tbCustomer);

        javax.swing.GroupLayout jpIPCustomerLayout = new javax.swing.GroupLayout(jpIPCustomer);
        jpIPCustomer.setLayout(jpIPCustomerLayout);
        jpIPCustomerLayout.setHorizontalGroup(
            jpIPCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 806, Short.MAX_VALUE)
        );
        jpIPCustomerLayout.setVerticalGroup(
            jpIPCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpIPCustomerLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 453, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout itnfShowCustomerLayout = new javax.swing.GroupLayout(itnfShowCustomer.getContentPane());
        itnfShowCustomer.getContentPane().setLayout(itnfShowCustomerLayout);
        itnfShowCustomerLayout.setHorizontalGroup(
            itnfShowCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, itnfShowCustomerLayout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jpIPCustomer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        itnfShowCustomerLayout.setVerticalGroup(
            itnfShowCustomerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(itnfShowCustomerLayout.createSequentialGroup()
                .addComponent(jpIPCustomer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(itnfShowCustomer)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(itnfShowCustomer)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void tbCustomerMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tbCustomerMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_tbCustomerMouseClicked

    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JInternalFrame itnfShowCustomer;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel jpIPCustomer;
    private javax.swing.JTable tbCustomer;
    // End of variables declaration//GEN-END:variables
}
